ig.module(
	'game.entities.previousButton'
)
.requires(
	'impact.entity',
        'game.entities.base.baseButton'
)
.defines(function()
{
    EntityPreviousButton = EntityBaseButton.extend(
    {
        normalButton: new ig.Image("media/images/previous.png"),
        overButton: new ig.Image("media/images/previousOver.png"),
	
	init: function(x, y, settings)
	{
	    this.parent(x, y, settings);	    
	},
	
        onClick: function()
        {
            this.parent();
	    if (ig.global.currentQuestion > 0)
	    {
		ig.global.currentQuestion--;
		ig.global.questionChanged = true;		
	    }
        },	
    });
});